"""ihome URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url

from users import views

urlpatterns = [
    url(r'^api/v1.0/user/register/$', views.RegisterView.as_view()),
    url(r'^api/v1.0/imagecode/$', views.ImagecodeView.as_view()),
    url(r'^api/v1.0/smscode/$', views.SmscodeView.as_view()),
    url(r'^index.html/$', views.IndexView.as_view()),
    url(r'^$', views.IndexView.as_view()),
    url(r'^api/v1.0/login/$', views.LoginView.as_view()),
    url(r'^api/v1.0/session/$', views.SessionView.as_view()),
    url(r'^api/v1.0/logout/$', views.LogoutView.as_view()),
    url(r'^api/v1.0/user/profile/$', views.UserInfoView.as_view()),
    url(r'^api/v1.0/user/avatar/$', views.ImageUp.as_view()),
    url(r'^(?P<file_name>.*?\.html)$', views.get_html_file),
    url(r'^auth.html/$', views.auth),
    # url(r'^auth.html/$', views.RealName.as_view(), name='auth'),
    url(r'^api/v1.0/user/auth/$', views.RealName.as_view()),
    url(r'^login.html/$', views.LoginView.as_view()),
    url(r'^my.html/$', views.MyView.as_view(), name='my'),
    url(r'^register.html/$', views.RegisterView.as_view()),
    url(r'^profile.html/$', views.ProfileView.as_view(), name='profile'),
    url(r'^api/v1.0/logout/$', views.LogoutView.as_view()),

]
